<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    const ws = new WebSocket('ws://localhost:8080/ws/123456');
    ws.onopen = function (event) {
        ws.send('hello');
    }
    ws.onmessage = function (event) {
        console.log(event.data);
        ws.close()
    }
</script>
</body>
</html>